package com.le.tester.javaThink.fifth.chapter14_StreamingProgramming;

import java.io.IOException;

/**
 * 描述：基于流的创建
 */
public class FileToWordsTest {
    public static void main(String[] args) throws IOException {
        FileToWords.stream("E:\\L.info\\L.Application\\L.Tester\\src\\main\\java\\com\\le\\tester\\java8\\doc\\Cheese.dat")
                .limit(7)
                .forEach(s -> System.out.format("%s ", s));
        System.out.println();
        FileToWords.stream("E:\\L.info\\L.Application\\L.Tester\\src\\main\\java\\com\\le\\tester\\java8\\doc\\Cheese.dat")
                .skip(7)
                .limit(2)
                .forEach(s -> System.out.format("%s", s));
    }
}
